package com.wpen.unit.web.dto.job;

import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.wpen.unit.commun.BaseRequest;

@Schema(description = "任务信息-新增(请求)")
@Data
@EqualsAndHashCode(callSuper=false)
public class TaskInfoAddRequest extends BaseRequest implements Serializable {
    private static final long serialVersionUID = 3748013572408380531L;

    @Schema(description =  "业务系统编号", required = true)
    @NotEmpty
    @Size(min = 0, max = 16)
    private String bizCode;
    @Schema(description =  "批次编号", required = true)
    @NotEmpty
    @Size(min = 0, max = 16)
    private String batchCode;
    @Schema(description =  "任务编号", required = true)
    @NotEmpty
    @Size(min = 0, max = 16)
    private String taskCode;
    @Schema(description =  "执行方式", required = true)
    @NotEmpty
    @Size(min = 0, max = 1)
    private String scheduleType;
    @Schema(description =  "执行时间")
    @Size(min = 0, max = 256)
    private String scheduleConf;
    @Schema(description =  "序号", required = true)
    @NotNull
    private Integer orders;
    @Schema(description =  "任务说明")
    @Size(min = 0, max = 255)
    private String taskName;
    @Schema(description =  "应用模式", required = true)
    @NotEmpty
    @Size(min = 0, max = 1)
    private String appMode;
    @Schema(description =  "应用名称")
    @Size(min = 0, max = 256)
    private String appJarName;
    @Schema(description =  "启动最大延迟时间", required = true)
    @NotNull
    private Integer startupMaxDelay;
    @Schema(description =  "执行预估超时", required = true)
    @NotNull
    @Min(0)
    @Max(720)
    private Integer exeTimeout;
    @Schema(description =  "失败忽略", required = true)
    @NotEmpty
    @Size(min = 0, max = 1)
    private String failIgnore;
    @Schema(description =  "运行模式", required = true)
    @NotEmpty
    @Size(min = 0, max = 1)
    private String appRunMode;
    @Schema(description =  "启动命令")
    @Size(min = 0, max = 256)
    private String appStartupCmd;
    @Schema(description =  "地域1部署数量")
    @Min(0)
    @Max(999)
    private Integer az1InstNums;
    

}